<template>
	<view>
		子组件
		<!-- <button @click="$emit('add',Math.random())">通信按钮</button> -->
		<button @click="onClick">通信按钮</button>
		<view class="">
			-----------

		</view>
		<input type="text" @input="onInput" placeholder="请输入字体大小" />

	</view>
</template>

<script>
	export default {
		name: "xxm-child",
		data() {
			return {

			};
		},
		methods: {
			onClick() {
				this.$emit('add', Math.random())

			},
			onInput(e) {
				// console.log(e.detail.value)
				let value = e.detail.value
				this.$emit('change', value)

			}
		}
	}
</script>

<style lang="scss" scoped>
	input {
		border: 1px solid #cfcfcf;
		height: 40px;
	}
</style>